module.exports = {
  apps: [
    {
      name: 'lottery-client',
      script: 'lottery-client.js',
    },
  ],
  deploy: {
    production: {
      user: 'root',
      host: '118.31.62.229',
      ref: 'origin/master',
      repo: 'git@gitee.com:zhang-wenchang/lottery-client.git',
      path: '~/workspace/lottery-client',
      'post-deploy': 'git reset --hard && git checkout master && git pull && npm i --production=false && npm run build:release && ~/node-v12.22.5-linux-x64/bin/pm2 start', // -production=false 下载全量包
      env: {
        NODE_ENV: 'production',
      },
    },
  },
}